<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<center>
	<h1>XX公司员工信息表</h1>
	<hr/>
	<form action="EmpServlet?methodType=findByCondition" method="post">
	<table border="1px" width="80%">
		<tr>
			<td>员工编号</td>
			<td><input name="empid" size="1" value="${sessionScope.empid }"/></td>
			<td>员工姓名</td>
			<td><input name="empname" size="5" value="${sessionScope.empname }"/></td>
			<td>性别</td>
			<td><select name="empgender"><option value="">不限</option><option value="男" >男</option>
						<option value="女">女</option></select></td>
			<td>年龄</td>
			<td>从<input name="minage" size="1"/>至<input name="maxage" size="1"/></td>
			<td>所属部门</td>
			<td><select name="deptid"><option value="">不限</option>
						<c:forEach var="dept" items="${depts }"><
						<option value="${dept.deptId }">${dept.deptName }</option>
						</c:forEach>
			</select></td>
			<td><input type="submit" value="查询"></td>
		</tr>
	</table>
	</form>
	</center>
	<br/>
	<a href="">新增</a>
	<center>
	<table border="1px" width="80%">
		<tr>
			<th>员工编号</th>
			<th>员工姓名</th>
			<th>性别</th>
			<th>年龄</th>
			<th>住宿地址</th>
			<th>电话号码</th>
			<th>入职时间</th>
			<th>所在部门</th>
			<th>操作</th>
		</tr>
		<c:forEach var="emp" items="${emps }" begin="${begin }" end="${end }">
			<tr>
				<td>${emp.empId }</td>
				<td>${emp.empName }</td>
				<td>${emp.empSex }</td>
				<td>${emp.empAge }</td>
				<td>${emp.empAddr }</td>
				<td>${emp.empPhone }</td>
				<td>${emp.empDate }</td>
				<td>${emp.deptName }</td>
				<td><a href="">修改</a>&nbsp;&nbsp;<a href="">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	<!-- 分页信息 -->
	<table border="1px" width="80%">
		<tr>
			<td><a href="EmpServlet?methodType=findAll&currentPage=1">首页</a></td>
			<td><a href="EmpServlet?methodType=findAll&currentPage=${currentPage-1 }">上一页</a></td>
			<td><a href="EmpServlet?methodType=findAll&currentPage=${currentPage+1 }">下一页</a></td>
			<td><a href="EmpServlet?methodType=findAll&currentPage=${pageCount }">尾页</a></td>
			<td>共${pageCount }页 </td>
			<td>当前是第${currentPage }页</td>
			<td>共${count }条记录</td>
			<td>每页显示${pageNorm }条记录</td>
		</tr>
	</table>
	</center>
	
</body>
</html>